package com.alibaba.citrus.cr.sales.plan.functions.salesplan;

import com.alibaba.citrus.cr.common.util.SpringContextUtil;
import com.alibaba.citrus.cr.sales.plan.repository.SalesPlanScItemExtendRepository;
import com.alibaba.citrus.cr.sales.plan.sdo.SalesPlanPublishSDO;
import lombok.Getter;
import lombok.Setter;

public class SalesPlanPublishEntity {
    @Getter
    @Setter
    private SalesPlanPublishSDO salesPlanPublishSDO;

    private static SalesPlanScItemExtendRepository salesPlanScItemExtendRepository;

    static {
        salesPlanScItemExtendRepository = SpringContextUtil.getBean(SalesPlanScItemExtendRepository.class);
    }

    public static SalesPlanPublishEntity of(SalesPlanPublishSDO salesPlanPublishSDO) {
        SalesPlanPublishEntity entity = new SalesPlanPublishEntity();
        entity.setSalesPlanPublishSDO(salesPlanPublishSDO);
        return entity;
    }


    public Integer doEdit() {
        return salesPlanScItemExtendRepository.edit(salesPlanPublishSDO);
    }


}
